module CommentsHelper

	def Comment.countComments(resourceId)
    	query = "Select COUNT(*) from comments where resource_id = #{resourceId}"
    	numOfCommentsForThisResource = Comment.count_by_sql query
    	return numOfCommentsForThisResource
	end
end
